package com.ruoyi.school.controller;

import org.openapi.common.ApiResult;
import org.openapi.service.IOpenDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 大屏公开数据接口
 *
 * @author yepanpan
 * @date 2023-07-10
 */
@RestController
@RequestMapping("/dv")
public class DvController {

    @Autowired
    private IOpenDataService openDataService;

    /**
     * 查询数据源
     */
    @GetMapping("/ds/{code}")
    public ApiResult ds(@PathVariable("code") String code, @RequestParam Map data)
    {
        return ApiResult.success(openDataService.doDs(code, data));
    }

}
